#ifndef DIRECTORYMANAGER_H
#define DIRECTORYMANAGER_H

#include <string>
#include <hash_map>

class DirectoryLocator{
public:
	DirectoryLocator(const std::string &p, const std::string &z) {path = p; zippath = z;};
	std::string path;
  std::string zippath;
};

class DirectoryManager{
public:
  DirectoryManager();
	void indexDirectory(const std::string & path);
	void addIndex(const std::string & key, const std::string & path, const std::string & zippath = "");

  /* 
    Load a file into memory. 'data' should be freed after it is used.
  */
	int load(const std::string & path, char ** data);
private:
  stdext::hash_map<std::string, DirectoryLocator> _directory_map;
};

#endif
